Page({
  data: {
    next: false,
  },
  to_next() {
    this.setData({
      next: true,
    });
  },
  formSubmit(e) {
    let valObj = e.detail.value;
    let name = e.detail.value.uname;
    let phone = e.detail.value.phone;
    let city = e.detail.value.city;
    let address = e.detail.value.address;
    if (name && phone && city && address) {
      wx.showToast({
        title: "提交成功",
        icon: "success",
        duration: 1500,
        mask: true,
      });
      setTimeout(() => {
        wx.navigateTo({
          url: "/pages/home/home",
        });
      }, 1500);
    } else {
      wx.showToast({
        title: "请填写完整信息",
        icon: "none",
        duration: 1500,
        mask: true,
      });
    }
  },
});
